package com.ruoyi.system.mapper;


import com.ruoyi.system.domain.Difficult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: zhang
 * @Date: 2023/02/19/10:17
 * @Description:
 */

public interface DifficultMapper {
    @Insert("insert into t_test_difficult(difficult_name) values(#{name})")
    int insertDifficult(Difficult difficult);
    @Update("update t_test_difficult set difficult_name=#{name} where difficult_id=#{id}")
    int updateDifficult(Difficult difficult);
    @Delete("delete from t_test_difficult where difficult_id=#{id}")
    int deleteById(Integer id);
    @Select("select difficult_id as id,difficult_name as name from t_test_difficult  where difficult_id=#{id}")
    Difficult selectById(Integer id);
    @Select("select difficult_id as id,difficult_name as name from t_test_difficult  where difficult_name like '%${name}%'")
    List<Difficult> select(Difficult difficult);
}
